home *** CD-ROM | disk | FTP | other *** search
- WBStartup
- #Width=320
- #Height=240
- MCPU Processor
- Mc2pCPUmode Processor
- InitBank 0,(2240+#Width)*60,$10002
- CludgeBitMap 0,2240+#Width,60,8,Bank(0)
- InitPalette 0,256
- LoadBitMap 0,"Land7.iff",0
- MReserveBitmaps 2
- MBitmap 0,2240+#Width,60
- MPlanar16ToBitmap 0,Bank(0),2240,60,2240+#Width,60
- MBlockScroll 0,0,#Width,60,2240,0,0
- MReserveShapes 1
- MGetaShape 0,0,4,16,8
- MBitmap 1,#Width,#Height
- InitBank 0,#Width*#Height,$10002
- CludgeBitMap 0,#Width,#Height,8,Bank(0)
- Screen 0,8,0,#Width,#Height,8,0,"",0,0,0
- ShowPalette 0
- Cls 0
- MReservec2pWindows 1
- Mc2pWindow 0,#Width,#Height
- MReserveQueues 1
- MQueue 0,1
- speedsetting.q=1 ; Global speed multiplier
- xpos.q=0
- xaccelerate.q=0.75*speedsetting
- xmomentum.q=0
- xairresistance.q=0.1*speedsetting
- xmaxspeed.q=16*speedsetting
- ypos.q=(#Height-69)/2
- yaccelerate.q=0.65*speedsetting
- ymomentum.q=0
- ymaxspeed.q=10*speedsetting
- ytopdampen.q=1.9
- ybottomdampen.q=1.65
- ygravity.q=0.15
- cnt.l=0
- ResetTimer
- While Joyb(1)=0
-
- jh=JHoriz(1)
- jv=JVert(1)
-
- xmomentum+(xaccelerate*jh)
- ymomentum+(yaccelerate*jv)
-
- ymomentum+ygravity
- If xmomentum>0
- xmomentum-xairresistance
- If xmomentum<0 Then xmomentum=0
- Else
- xmomentum+xairresistance
- If xmomentum>0 Then xmomentum=0
- EndIf
-
- If xmomentum>xmaxspeed Then xmomentum=xmaxspeed
- If xmomentum<-xmaxspeed Then xmomentum=-xmaxspeed
- If ymomentum>ymaxspeed Then ymomentum=ymaxspeed
- If ymomentum<-ymaxspeed Then ymomentum=-ymaxspeed
-
- xpos+xmomentum
- ypos+ymomentum
-
- If ypos<0
- ymomentum=-ymomentum/ytopdampen
- ypos=0
- EndIf
- If ypos>#Height-69
- ymomentum=-ymomentum/ybottomdampen
- ypos=#Height-69
- EndIf
-
- If xpos<0 Then xpos=2240+xpos
- If xpos>=2240 Then xpos-2240
-
- cnt+1
- ; MScroll xpos,0,#Width,60,0,#Height-61,0
- mult.q=1.0
- For y=0 To 59
- x=xpos*mult
- If x>2239 Then x-2240
- If x<0 Then x+2240
- MScroll x,y,#Width,1,0,#Height-61+y,0
- mult*1.01
- Next y
- MQBlit 0,0,160-8,ypos
- Mc2p Bank(0)
- MUnQueue 0
- VWait
- Wend
- ;t=Timer
- ;a.q=50.0/(t/cnt)
- ;NPrint a
- ;VWait 50
- ;MouseWait
- End
-
-